package  
{
  import mge.graph.Edge;
	/**
   * ...
   * @author ivan
   */
  public class AddEdgeCommand implements Command
  {
    
    public function AddEdgeCommand(graphStage:GraphStage, edge:Edge) 
    {
      visualEdge = new VisualEdge(edge);
      this.graphStage = graphStage;
      redo();
    }
    
    public function undo():void
    {
      graphStage.removeChild(visualEdge);
    }
    
    public function redo():void
    {
      graphStage.addChild(visualEdge);
    }
    
    private var graphStage:GraphStage;
    private var visualEdge:VisualEdge;
    
  }

}